﻿using System;

namespace SpringSeries.Core.ValidatorActions {
    public class Person {
        private int _id = 0;
        public int Id {
            get { return _id; }
        }

        private string _firstName = String.Empty;
        public string FirstName {
            get { return _firstName; }
            set { _firstName = value; }
        }

        private string _lastName = String.Empty;
        public string LastName {
            get { return _lastName; }
            set { _lastName = value; }
        }

        private DateTime _dateOfBirth = DateTime.MinValue;
        public DateTime DateOfBirth {
            get { return _dateOfBirth; }
            set { _dateOfBirth = value; }
        }

        private AddressInfo _addressInfo = new AddressInfo();
        public AddressInfo AddressInfo {
            get { return _addressInfo; }
            set { _addressInfo = value; }
        }

        public Person(int id) {
            _id = id;
        }

        public override string ToString() {
            return String.Format("ID:{0} First Name:{1} Last Name:{2}", Id, FirstName, LastName) + " " + AddressInfo.ToString();
        }
    }
}
